﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Master/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="InvoiceCheck.aspx.cs" Inherits="HZ.DrugTrade.Web.Admin.ProcureManage.InvoiceCheck"
    Title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script language="javascript">

        function switchType(obj) {
            if (obj.selectedIndex == 0) {
                this.document.getElementById('reasonDiv').style.display = 'none';
            }
            else {

                this.document.getElementById('reasonDiv').style.display = 'block';
            }
        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabnav">
        <ul>
            <li class="active"><a href="InvoiceCheck.aspx">待审核发票</a></li>
            <li><a href="InvoiceResolved.aspx">已审核发票</a></li>
        </ul>
    </div>
    <div id="tabcontent">
        <table class="querylist">
            <tr>
                <td>
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwInvoice" runat="server" AutoGenerateColumns="false" Width="100%"
        EmptyDataText="暂无需要审核的发票！" OnRowDataBound="gvwInvoice_RowDataBound">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1) %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="InvoiceID" HeaderText="发票编号" />
            <asp:BoundField DataField="InvoiceTime" HeaderText="发票时间" />
            <asp:BoundField DataField="TotalAmount" HeaderText="总金额" />
            <asp:BoundField DataField="DistributionCount" HeaderText="采购单数" />
            <asp:TemplateField HeaderText="审核状态">
                <ItemTemplate>
                    <asp:Literal ID="ltrStatus" runat="server" Text='<%# Eval("AuditStatus") %>'></asp:Literal>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <a href='InvoiceDetail.aspx?InvoiceSerialID=<%# Eval("InvoiceSerialID") %>'>详细</a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText=" ">
                <HeaderTemplate>
                    <input id="chkAll" name="chkAll" type="checkbox" onclick="SelectAllCheckboxes(this,'ctl00_ContentPlaceHolder1_gvwInvoice','chkAll'); " />
                </HeaderTemplate>
                <ItemTemplate>
                    <input type="checkbox" name="chkInvoice" id="chkInvoice" value='<%#Eval("InvoiceSerialID")%>'
                        onclick="chkChecked(this,'ctl00_ContentPlaceHolder1_gvwInvoice','chkAll');" runat="server" />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <webdiyer:AspNetPager ID="AspNetPager1" runat="server" OnPageChanged="AspNetPager1_PageChanged">
    </webdiyer:AspNetPager>
    <div class="maincon">
        <table>
            <tr>
                <th>
                    <asp:Label ID="lblType" runat="server" Text="操作类型："></asp:Label>
                </th>
                <td>
                    <asp:DropDownList ID="ddlType" runat="server" onchange="switchType(this);">
                        <asp:ListItem Value="1">通过</asp:ListItem>
                        <asp:ListItem Value="0">不通过</asp:ListItem>
                    </asp:DropDownList>
                    <div id="reasonDiv" style="display: none;">
                        <br />
                        原因：<asp:TextBox ID="txtReason" runat="server" Width="192px" Height="48px" TextMode="MultiLine"></asp:TextBox></div>
                </td>
            </tr>
        </table>
    </div>
    <div class="listip">
        <ul>
            <li>提示:<span> 需批量操作发票时，请先选中需操作的发票，然后点击相应的按钮；需查看发票的详细信息时，请点击“详细”按钮；若发票不通过，请注明不通过原因。</span></li>
        </ul>
    </div>
    <div class="listctrl">
        <hz:HzButton ID="btnConfirm" runat="server" Text="审核" CssClass="btn" OnClick="btnConfirm_Click"
            OnClientClick="if(checkSelectedItems('ctl00_ContentPlaceHolder1_gvwInvoice','请至少选定一个发票！')) {return confirm('确定要对所选发票进行操作吗？');}return false;"
            OperateType="审核" />
    </div>
</asp:Content>
